using System.Collections.Generic;
using UnityEngine;

public class SO_Data_Scene : ScriptableObject
{
	public List<string> _List_MapName;

	public List<Data_SceneLink> _List_SceneLink;

	public List<Data_SceneLinkPoint> _List_SceneLinkPoint;

	public List<Data_Scene_土地庙> _List_关卡ID_土地庙Pos;

	public (int, int) F_GetSceneLink(string currMapName, int curr传送点ID)
	{
		int num = _List_MapName.IndexOf(currMapName);
		if (num == -1)
		{
			return (-1, -1);
		}
		return F_GetSceneLink(num, curr传送点ID);
	}

	public (int, int) F_GetSceneLink(int currMapID, int curr传送点ID)
	{
		foreach (Data_SceneLink item in _List_SceneLink)
		{
			if (item._1_MapID == currMapID && item._1_传送点ID == curr传送点ID)
			{
				return (item._2_MapID, item._2_传送点ID);
			}
			if (item._2_MapID == currMapID && item._2_传送点ID == curr传送点ID)
			{
				return (item._1_MapID, item._1_传送点ID);
			}
		}
		return (-1, -1);
	}

	public Vector2 F_Get_MapPonit_传送(int mapID, int 传送点ID)
	{
		foreach (Data_SceneLinkPoint item in _List_SceneLinkPoint)
		{
			if (item._MapID == mapID && item._传送点ID == 传送点ID)
			{
				return item._Pos;
			}
		}
		Debug.LogError($"没有找到mapID={mapID},传送点ID={传送点ID}的传送点");
		return new Vector2(0f, 0f);
	}

	public Vector2 F_Get_MapPonit_上香(int mapID)
	{
		foreach (Data_Scene_土地庙 list_关卡ID_土地庙Po in _List_关卡ID_土地庙Pos)
		{
			if (list_关卡ID_土地庙Po._MapID == mapID)
			{
				return list_关卡ID_土地庙Po._Pos;
			}
		}
		Debug.LogError($"没有找到mapID={mapID}的上香点");
		return F_Get_MapPonit_传送(1, 1);
	}

	public bool F_MapPonit_上香_是否存在(int 上香地图ID)
	{
		foreach (Data_Scene_土地庙 list_关卡ID_土地庙Po in _List_关卡ID_土地庙Pos)
		{
			if (list_关卡ID_土地庙Po._MapID == 上香地图ID)
			{
				return true;
			}
		}
		return false;
	}
}
